58,59c58,59
< #define SOCKET_NAME_RIL "rild"
< #define SOCKET_NAME_RIL_DEBUG "rild-debug"
---
> #define SOCKET_NAME_RIL_DSDS(callback) ((callback).getSimId() == 2 ? "rild2" : "rild")
> #define SOCKET_NAME_RIL_DEBUG_DSDS(callback) ((callback).getSimId() == 2 ? "rild-debug2" : "rild-debug")
148c148
< RIL_RadioFunctions s_callbacks = {0, NULL, NULL, NULL, NULL, NULL};
---
> RIL_RadioFunctions s_callbacks = {0, NULL, NULL, NULL, NULL, NULL, NULL}; //DSDS
2924c2924
<     s_fdListen = android_get_control_socket(SOCKET_NAME_RIL);
---
>     s_fdListen = android_get_control_socket(SOCKET_NAME_RIL_DSDS(s_callbacks));
2926c2926
<         LOGE("Failed to get socket '" SOCKET_NAME_RIL "'");
---
>         LOGE("Failed to get socket %s", SOCKET_NAME_RIL_DSDS(s_callbacks));
2949c2949
<     s_fdDebug = android_get_control_socket(SOCKET_NAME_RIL_DEBUG);
---
>     s_fdDebug = android_get_control_socket(SOCKET_NAME_RIL_DEBUG_DSDS(s_callbacks));
2951c2951
<         LOGE("Failed to get socket '" SOCKET_NAME_RIL_DEBUG "' errno:%d", errno);
---
>         LOGE("Failed to get socket %s errno:%d", SOCKET_NAME_RIL_DEBUG_DSDS(s_callbacks), errno);
